﻿//轮换2
function reSwitchPic() {
	refreshSwitchTimer = null;
	switchPic(CurScreen+1);
	refreshSwitchTimer = setTimeout('reSwitchPic();', 3000);
}
function switchPic(screen) {
	if (screen > MaxScreen) {
		screen = 1 ;
	}
	
	for (i=1;i<=MaxScreen;i++) {
		document.getElementById("Switch_"+i).style.display = "none" ;
	}
	document.getElementById("Switch_"+screen).style.display = "block" ;
	showSwitchNav(screen);
	showSwitchTitle(screen);
	//Effect.Appear("Switch_"+screen);			
	//switchLittlePic(screen);
	//showSwitchTitles(screen);
	CurScreen = screen  ;
}
function showSwitchNav(screen) {
	var NavStr = "" ;
	for (i=1;i<=MaxScreen;i++) {
		if (i == screen) {
			NavStr += '<li onmouseover="pauseSwitch();" onmouseout="goonSwitch();"><a href="'+Switcher[screen]['link']+'" target="_blank" class="sel">'+i+'</a></li>' ;
		}
		else {
			NavStr += '<li onmouseover="pauseSwitch();goManSwitch('+i+');" onmouseout="goonSwitch();" onclick="goManSwitch('+i+');"><a href="'+Switcher[screen]['link']+'" target="_blank">'+i+'</a></li>' ;
		}
		
	}
	document.getElementById("SwitchNav").innerHTML = NavStr ;
}
function showSwitchTitle(screen) {
	var titlestr = "" ; 
	titlestr = '<p><h3><a href="'+Switcher[screen]['link']+'" target="_blank">'+Switcher[screen]['stitle']+'</a></h3><div class="focus_add"><h4><a href="'+Switcher[screen]['link']+'" target="_blank">'+Switcher[screen]['stitle']+'</a></h4><span>'+Switcher[screen]['content']+'<a href="'+Switcher[screen]['link']+'" target="_blank">[全文]</a></span></div></p>' ;
	document.getElementById("SwitchTitle").innerHTML = titlestr ;

}
function pauseSwitch() {
	clearTimeout(refreshSwitchTimer);
}
function goonSwitch() {
	clearTimeout(refreshSwitchTimer);
	refreshSwitchTimer = setTimeout('reSwitchPic();', 3000);
}
function goManSwitch(index) {
	clearTimeout(refreshSwitchTimer);
	
	CurScreen = index - 1 ;
	reSwitchPic();
}
var MaxScreen = 6 ;
var CurScreen = 1 ;
 
function SwichTab_edu($,A,_){
  for(i=0;i<_;i++){
    document.getElementById($+"_c0"+i).style.display="none";
    document.getElementById($+"_btn"+i).className="new_btn09";
  }
  document.getElementById($+"_c0"+A).style.display="block";
  document.getElementById($+"_btn"+A).className="new_btn08";
}
